package com.cheng.frame;

import java.awt.Color;
import java.awt.Font;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;

import org.dyno.visual.swing.layouts.Constraints;
import org.dyno.visual.swing.layouts.GroupLayout;
import org.dyno.visual.swing.layouts.Leading;


public class PerInfoPanel extends JPanel{
	private static final long serialVersionUID = 1L;
	private PerInfoPanel perInfoPanel;
	private JLabel jLabel0;
	private JLabel jLabel1;
	private JLabel jLabel2;
	private JLabel jLabel3;
	private JLabel jLabel4;
	private JTextField tName;
	private JTextField tSex;
	private JTextField tPlace;
	private JTextField tNation;
	private JTextField tBirth;
	
	public PerInfoPanel(){
		perInfoPanel = this;
		perInfoPanel.setBorder(BorderFactory.createTitledBorder(null, "个人基本信息", TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD,
				12), new Color(51, 51, 51)));
		perInfoPanel.setLayout(new GroupLayout());
		perInfoPanel.add(getJLabel0(), new Constraints(new Leading(50, 65, 10, 10), new Leading(15, 30, 10, 10)));
		perInfoPanel.add(getJLabel1(), new Constraints(new Leading(50, 65, 10, 10), new Leading(70, 30, 10, 10)));
		perInfoPanel.add(getJLabel2(), new Constraints(new Leading(50, 65, 10, 10), new Leading(125, 30, 10, 10)));
		perInfoPanel.add(getJLabel4(), new Constraints(new Leading(50, 65, 10, 10), new Leading(180, 30, 10, 10)));
		perInfoPanel.add(getJLabel3(), new Constraints(new Leading(50, 65, 10, 10), new Leading(235, 30, 10, 10)));
		perInfoPanel.add(getTName(), new Constraints(new Leading(135, 175, 10, 10), new Leading(15, 30, 10, 10)));
		perInfoPanel.add(getTSex(), new Constraints(new Leading(135, 175, 10, 10), new Leading(70, 30, 10, 10)));
		perInfoPanel.add(getTPlace(), new Constraints(new Leading(135, 175, 10, 10), new Leading(125, 30, 10, 10)));
		perInfoPanel.add(getTNation(), new Constraints(new Leading(135, 175, 10, 10), new Leading(180, 30, 10, 10)));
		perInfoPanel.add(getTBirth(), new Constraints(new Leading(135, 175, 10, 10), new Leading(235, 30, 10, 10)));
	}
	
	public PerInfoPanel getPanel() {
		if (perInfoPanel == null) {
			perInfoPanel = new PerInfoPanel();
		}
		return perInfoPanel;
	}
	

	private JLabel getJLabel4() {
		if (jLabel4 == null) {
			jLabel4 = new JLabel();
			jLabel4.setText("民族");
		}
		return jLabel4;
	}

	private JLabel getJLabel3() {
		if (jLabel3 == null) {
			jLabel3 = new JLabel();
			jLabel3.setText("出生年月");
		}
		return jLabel3;
	}

	private JLabel getJLabel2() {
		if (jLabel2 == null) {
			jLabel2 = new JLabel();
			jLabel2.setText("籍贯");
		}
		return jLabel2;
	}

	private JLabel getJLabel1() {
		if (jLabel1 == null) {
			jLabel1 = new JLabel();
			jLabel1.setText("性别");
		}
		return jLabel1;
	}
	
	private JLabel getJLabel0() {
		if (jLabel0 == null) {
			jLabel0 = new JLabel();
			jLabel0.setText("姓名");
		}
		return jLabel0;
	}
	
	public JTextField getTBirth() {
		if (tBirth == null) {
			tBirth = new JTextField();
		}
		return tBirth;
	}

	public JTextField getTNation() {
		if (tNation == null) {
			tNation = new JTextField();
		}
		return tNation;
	}

	public JTextField getTPlace() {
		if (tPlace == null) {
			tPlace = new JTextField();
		}
		return tPlace;
	}

	public JTextField getTSex() {
		if (tSex == null) {
			tSex = new JTextField();
		}
		return tSex;
	}

	public JTextField getTName() {
		if (tName == null) {
			tName = new JTextField();
		}
		return tName;
	}
}
